package MyGO;

import MyGO.Form.TrackForm;
import MyGO.service.*;
import MyGO.service.impl.*;
import MyGO.utils.FileUtils.FileIO;

import java.io.IOException;
import java.util.List;

import static MyGO.utils.DateTimeUtils.getTime.getDateTime;

public class Load {
    public static void load() throws IOException {
        IAmountService amountService = new AmountServiceImpl();
        FileIO.writeObjectAsJsonFile(amountService.getAllAmount(), "Amount.json");

        ICheackProService cheackProService = new CheckProServiceImpl();
        FileIO.writeObjectAsJsonFile(cheackProService.selectAllCheckPro(), "CheckPro.json");
        FileIO.writeObjectAsJsonFile(cheackProService.getAllCheckPro(), "CheckProMap.json");

        IDoctorService doctorService = new DoctorServiceImpl();
        FileIO.writeObjectAsJsonFile(doctorService.selevtAllDoctor(), "Doctor.json");
        FileIO.writeObjectAsJsonFile(doctorService.IDToDoctor(), "DoctorMap.json");

        IMedicineService medicineService = new MedicineServiceImpl();
        FileIO.writeObjectAsJsonFile(medicineService.getMedicineList(), "Medicine.json");
        FileIO.writeObjectAsJsonFile(medicineService.getMedicineMap(), "MedicineMap.json");
    }
}
